<template>
    <div>
      <select :value="value" @change="selectCity">
        <option value="1">北京</option>
        <option value="2">上海</option>
        <option value="3">广州</option>
        <option value="4">深圳</option>
        <option value="5">武汉</option>
      </select>
      <button @click="changeAge" >{{ age }}</button>
      </div>
  </template>
  
  <script>
  export default {
    props:{
        value:String,
        age:Number
    },methods:{
        selectCity(event){
            console.log(event.target.value);
            this.$emit('value',event.target.value)
        },
        changeAge(){
            this.$emit('update:age',99)
        }
    }
  }
  </script>
  
  <style scoped></style>
  